
Partial Class BProfile
    Inherits System.Web.UI.Page
    Dim str As String

    Protected Sub lnkEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkEdit.Click
        Response.Redirect("BEdit.aspx")
    End Sub

    Protected Sub imgbtnEdit_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnEdit.Click
        Response.Redirect("BEdit.aspx")
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("type") <> "buyer" Then
            Response.Redirect("Error.aspx")
            Exit Sub
        End If

        lnkProfName.Text = "Logged in as " & Session("prim") & " (" & Session("sec") & ")"

        Response.Cache.SetCacheability(HttpCacheability.NoCache)
        '|||||||||||||||||||||||||||||||||||||||||||||||||||||||
        Dim str As String
        str = Session("b_id")
        Dim a As New Globo
        a.executesql("select buyer_name, buyer_address, country, contact_person from buyers where buyer_id = '" & str & "'", False)

        If a.dr.Read = True Then

            lblName.Text = a.dr(0)
            lblCon.Text = a.dr(2)
            lblLoc.Text = a.dr(1)
            lblConPer.Text = a.dr(3)
            a.dr.Close()

        End If
    End Sub

    Protected Sub lnkNR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkNR.Click
        Session("NRload") = 0
        Response.Redirect("NewsRoom.aspx")
    End Sub

    Protected Sub imgbtnNR_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnNR.Click
        Session("NRload") = 0
        Response.Redirect("NewsRoom.aspx")
    End Sub

    '_________________________________________________________________________________________________________________________________
    '#################################################################################################################################
    Protected Sub lnkProfName_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkProfName.Click
        Response.Redirect("BEdit.aspx")
    End Sub

    'Protected Sub lnkQuery_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkQuery.Click
    '    Response.Redirect("Query.aspx")
    'End Sub

    Protected Sub lnkThemes_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkThemes.Click
        Response.Redirect("Themes.aspx")
    End Sub

    Protected Sub lnkSettings_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkSettings.Click
        Response.Redirect("Settings.aspx")
    End Sub

    Protected Sub lnkLogOut_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkLogOut.Click
        Server.Transfer("Loading.aspx")
    End Sub

    '_____________________________________________________________________________________________________________
    '*************************************************************************************************************
    Protected Sub lnkAboutUs_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkAboutUs.Click
        Response.Redirect("AboutUs.aspx")
    End Sub

    Protected Sub lnkTermCond_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkTermCond.Click
        Response.Redirect("TermsConditions.aspx")
    End Sub

    Protected Sub lnkContactUs_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkContactUs.Click
        Response.Redirect("ContactUs.aspx")
    End Sub

    Protected Sub lnkFAQs_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkFAQs.Click
        Response.Redirect("FAQs.aspx")
    End Sub

    Protected Sub lnkFeedback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkFeedback.Click
        Response.Redirect("Feedback.aspx")
    End Sub
End Class